package com.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.domain.TeamComposition;
import com.demo.core.exception.ParameterException;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface TeamCompositionService extends IService<TeamComposition> {

    TeamComposition getByTcId(Long tcId) throws ParameterException;

    Integer insertTeamComposition(TeamComposition teamComposition) throws ParameterException;

    Integer updateTeamComposition(TeamComposition teamComposition) throws ParameterException;

    Integer deleteTeamCompositionById(TeamComposition teamComposition) throws ParameterException;

    List<TeamComposition> selectTeamCompositionList(TeamComposition teamComposition) throws ParameterException;

    List<TeamComposition> listAllTeamComposition();
    /**
     * 获取队伍成员
     * @param teamComposition
     * @return
     */
    List<TeamComposition> getTeamMember(TeamComposition teamComposition) throws ParameterException;

    /**
     * 获取当前用户的组队信息
     * @param teamId
     * @param userId
     * @return
     */
    boolean getUserInfo(Long teamId,Long userId) throws ParameterException;

    /**
     * 删除队员
     * @param teamId
     * @param urealname
     * @param uid
     * @return
     */
    boolean deleTeamMember(Long teamId, String urealname, Long memberId, Long uid) throws ParameterException;

    /**
     * 添加队员
     * @param teamComposition
     * @param uid
     * @return
     */
    boolean increTeamMember(TeamComposition teamComposition, Long uid) throws ParameterException;
}
